<template>
  <div class="box">
    <h2>视频</h2>
    <el-menu
        style="margin-right: 100px"
        :default-active="activeIndex"
        class="el-menu-demo"
        mode="horizontal"
        active-text-color="green"
        @select="handleSelect"
        router
    >
      <el-menu-item   index="/homePage/video/1">推荐</el-menu-item>
      <el-menu-item  index="/homePage/video/2">视频库</el-menu-item>
      <el-menu-item  index="/homePage/video/3">排行</el-menu-item>
    </el-menu>
   <router-view></router-view>
  </div>
</template>

<script setup>
import {ref} from "vue";
const activeIndex = ref("1")
const handleSelect = (key, keyPath) => {
  console.log(key, keyPath)
}
</script>


<style scoped>
.box{
  margin-left: 100px;
}
</style>